package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod",fallback = VodClientFallBack.class)
@Component
//服务调用 service-vod
//@Component注解防止，在其他位置注入CodClient时idea报错
public interface VodClient {
    //删除单个
    @DeleteMapping(value = "/eduvod/video/removeAlyVideo/{videoId}")
    public R removeVideo(@PathVariable("videoId") String videoId);
    //删除多个视频，形式"xxx","xasda","123"....用逗号分割
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
